{% set uniqid = uniqid ?? uniqid('user_') %}
{% set idBase = "mariadb-users-#{uniqid}" %}
{% set nameBase = "mariadb[users][#{uniqid}]" %}

<div id="{{ idBase }}" data-uniqid="{{ uniqid }}" data-name="{{ nameBase }}"
     class="tab-pane {{ active is defined and active ? 'active' }}">
    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-name">
            Username
        </label>
        <input type="text" id="{{ idBase }}-name"
               name="{{ nameBase }}[name]"
               placeholder="username" class="form-control"
               value="{{ user.name }}" />
        <div class="help-block">
            Enter <code>{username}@{host}</code>
            for a specific host. If no host is defined, eg:
            <code>{username}</code>", it will
            automagically be converted to
            <code>{username}@localhost</code>
        </div>
    </div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-password">
            Password
        </label>
        <input type="text" id="{{ idBase }}-password"
               name="{{ nameBase }}[password]"
               placeholder="123" class="form-control"
               value="{{ user.password }}" />
        <div class="help-block">
            Password is required for each user.
        </div>
    </div>
</div>
